<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <span id="show"></span>
</body>

</html>
<script src="../js/jstool.js"></script>
<script>
    var preDate = new Date();
    var newDate = new Date()
    var res = chaTime(preDate, newDate)
    show.innerHTML = res;
    setInterval(function () {
        newDate = new Date();
        var res = chaTime(preDate, newDate)
        show.innerHTML = res
    }, 1000)
</script>